|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.pnr.hci.Property
public class Property
This Java class represents a custom property (string, number, or date) in a item.
ChargeableItemThe XML APIs specify the following XSD fragment:
XSD Fragment
<xs:simpleType name="propertyType">
<xs:restriction base="xs:string">
<xs:enumeration value="string"/>
<xs:enumeration value="number"/>
<xs:enumeration value="date"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="p">
<xs:complexType>
<xs:attribute name="t" type="propertyType"/>
<xs:attribute name="v" type="xs:string"/>
<xs:attribute name="n" type="xs:string"/>
</xs:complexType>
</xs:element>
| Field Summary | |
|---|---|
static int |
DATE
Constant for the date Property type. |
static int |
DATE_REF
Constant for the +100 date Property type. |
static int |
NUMBER
Constant for the number Property type. |
static int |
NUMBER_REF
Constant for the +100 number Property type. |
static int |
STRING
Constant for the string Property type. |
static int |
STRING_REF
Constant for the +100 string Property type. |
| Constructor Summary | |
|---|---|
Property()
Builds an empty property. |
|
Property(java.lang.String name,
int type,
java.lang.Object value)
Builds a chargeable item property. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
Property |
duplicate()
Returns a new clone instance of the property |
java.lang.String |
getName()
Returns the name of the custom property. |
int |
getType()
Returns the type of the custom property. |
java.lang.Object |
getValue()
Returns the value of the property. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setName(java.lang.String name)
Sets the name of the custom property. |
void |
setType(int type)
Sets the type of the property. |
void |
setValue(java.lang.Object val)
Sets the value of the property. |
ComponentProperty |
toComponentProperty()
Converts the Property to a ComponentProperty. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NUMBER
number Property type.
public static final int STRING
string Property type.
public static final int DATE
date Property type.
public static final int NUMBER_REF
+100 number Property type.
public static final int STRING_REF
+100 string Property type.
public static final int DATE_REF
+100 date Property type.
| Constructor Detail |
|---|
public Property()
public Property(java.lang.String name,
int type,
java.lang.Object value)
name - The name of the property (must be
unique for a given hargeableItem).
This name must be the same as the
name which is declared into the
associated PropertyDescriptionModel object.type - The type of the property.
This type must be the same as the type
which is declared into the
associated PropertyDescriptionModel object.value - The value of the property.
This value must be compatible with the
declared type.STRING,
NUMBER,
DATE,
STRING_REF,
NUMBER_REF,
DATE_REF| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
name - The name of the property of a chargeable itempublic int getType()
STRING,
NUMBER,
DATE,
STRING_REF,
NUMBER_REF,
DATE_REFpublic void setType(int type)
type - The type of the propertypublic java.lang.Object getValue()
java.math.BigDecimal
for a NUMBER type.java.util.Date
for a DATE type.java.lang.String
for a STRING type.
STRING,
NUMBER,
DATE,
STRING_REF,
NUMBER_REF,
DATE_REFpublic void setValue(java.lang.Object val)
val - The value of the propertygetValue(),
STRING,
NUMBER,
DATE,
STRING_REF,
NUMBER_REF,
DATE_REFpublic Property duplicate()
public void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic ComponentProperty toComponentProperty()
Property to a ComponentProperty.
ComponentProperty results from the conversion
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||